home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 7 / Amiga Format AFCD07 (Dec 1996, Issue 91).iso / serious / shareware / programming / aros / intuition / getattr.c < prev    next >
C/C++ Source or Header  |  1996-09-12  |  2KB  |  83 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: getattr.c,v 1.1 1996/08/28 17:55:34 digulla Exp $
  4.     $Log: getattr.c,v $
  5.     Revision 1.1  1996/08/28 17:55:34  digulla
  6.     Proportional gadgets
  7.     BOOPSI
  8.  
  9.  
  10.     Desc:
  11.     Lang: english
  12. */
  13. #include <clib/alib_protos.h>
  14. #include "intuition_intern.h"
  15.  
  16. /*****************************************************************************
  17.  
  18.     NAME */
  19.     #include <intuition/classusr.h>
  20.     #include <clib/intuition_protos.h>
  21.  
  22.     __AROS_LH3(ULONG, GetAttr,
  23.  
  24. /*  SYNOPSIS */
  25.     __AROS_LHA(unsigned long, attrID, D0),
  26.     __AROS_LHA(APTR         , object, A0),
  27.     __AROS_LHA(ULONG       *, storagePtr, A1),
  28.  
  29. /*  LOCATION */
  30.     struct IntuitionBase *, IntuitionBase, 109, Intuition)
  31.  
  32. /*  FUNCTION
  33.     Asks the specified object for the value of an attribute. This is not
  34.     possible for all attributes of an object. Read the documentation for
  35.     the class to find out which can be read and which can't.
  36.  
  37.     INPUTS
  38.     attrID - ID of the attribute you want
  39.     object - Ask the attribute from this object
  40.     storagePtr - This is a pointer to memory which is large enough
  41.         to hold a copy of the attribute. Most classes will simply
  42.         put a copy of the value stored in the object here but this
  43.         behaviour is class specific. Therefore read the instructions
  44.         in the class description carefully.
  45.  
  46.     RESULT
  47.     Mostly TRUE if the method is supported for the specified attribute
  48.     and FALSE if it isn't or the attribute can't be read at this time.
  49.     See the classes documentation for details.
  50.  
  51.     NOTES
  52.     This function sends OM_GET to the object.
  53.  
  54.     EXAMPLE
  55.  
  56.     BUGS
  57.  
  58.     SEE ALSO
  59.     NewObject(), DisposeObject(), SetAttr(), MakeClass(),
  60.     "Basic Object-Oriented Programming System for Intuition" and
  61.     "boopsi Class Reference" Dokument.
  62.  
  63.  
  64.     INTERNALS
  65.  
  66.     HISTORY
  67.     29-10-95    digulla automatically created from
  68.                 intuition_lib.fd and clib/intuition_protos.h
  69.  
  70. *****************************************************************************/
  71. {
  72.     __AROS_FUNC_INIT
  73.     __AROS_BASE_EXT_DECL(struct IntuitionBase *,IntuitionBase)
  74.     struct opGet get;
  75.  
  76.     get.MethodID    = OM_GET;
  77.     get.opg_AttrID  = attrID;
  78.     get.opg_Storage = storagePtr;
  79.  
  80.     return (DoMethodA (object, (Msg)&get));
  81.     __AROS_FUNC_EXIT
  82. } /* GetAttr */
  83.